using AutoMapper;
using Pay.DTO;
using Pay.IService;
using Pay.Core;
using Pay.Data;

namespace Pay.Service.AutoMapper {
	public class LogisticsNOMapper : IStartupDto {
		private IMapperConfigurationExpression _cfg;
		public LogisticsNOMapper(IMapperConfigurationExpression cfg) {
			_cfg = cfg;
		}
		public void Execute() {
			Create();
		}
		protected virtual void Create() {
            _cfg.CreateMap<LogisticsNO, logistics_no_dto>()
                .ForMember(dest => dest.id, src => src.MapFrom(c => c.Id))
                .ForMember(dest => dest.logisticsnumber, src => src.MapFrom(c => c.LogisticsNumber))
                .ForMember(dest => dest.logisticsstatus, src => src.MapFrom(c => c.LogisticsStatus));
                



            _cfg.CreateMap<logistics_no_dto, LogisticsNO>()
                .ForMember(dest => dest.Id, src => src.MapFrom(c => c.id))
                .ForMember(dest => dest.LogisticsNumber, src => src.MapFrom(c => c.logisticsnumber))
                .ForMember(dest => dest.LogisticsStatus, src => src.MapFrom(c => c.logisticsstatus)) ;
		}
	}
}
